/*======================= server.h ===============*/
#ifndef _H_SERVER
#define _H_SERVER

#include "messages.h"
#include "user.h"
#include "country.h"
#include "util.h"
#include "server_coord.h"

user USERS_LIST[USERS_LIST_SIZE];
country COUNTRIES_LIST[COUNTRIES_LIST_SIZE];
server_coord SERVERS_COORD[SERVERS_COORD_LIST_SIZE];

/* initiate the Users DB */
void read_users();

/* initiate the countries DB */
void read_countries();

void read_coords();

/* receive a put PDU */
void receive_put(char *pdu);

/* receive a get PDU */
int receive_get(char* user, char* pass);

/* receive a synch PDU */
void receive_synch();

/* main function */
int main(int argc, char *argv[]);

#endif
